<?php
define('IN_USER', true);
define('TS_ROOT', './');
require(TS_ROOT .'common.php');

// Start session management
$user->session_start();

$mode = request_var('mode', '');

switch($mode)
{
	case 'profile':
		require(USER_DIR . 'profile.php');
		break;
		
	case 'register':
	case 'edit':
		if (IS_GUEST && $mode == 'edit') login_redirect();
		require(USER_DIR . 'register.php');
		break;

	case 'sendpassword':
		require(USER_DIR . 'sendpasswd.php');
		break;
		
	default: 
		die("ERRORS MODE");
}